home *** CD-ROM | disk | FTP | other *** search
/ Your Web Site Creator / Your Web Site Creator.iso / WebSite / data1.cab / Program_Executable_Files / Classes / DYNAMIC2.CLA (.txt) < prev    next >
Encoding:
Java Class File  |  1999-01-13  |  748 b   |  30 lines

  1. import java.awt.Component;
  2.  
  3. public abstract class DynamicBorderPanel2 extends BorderPanel2 implements Runnable {
  4.    Thread theThread;
  5.    int sleepTime = 250;
  6.  
  7.    public void SetSleepTime(int var1) {
  8.       this.sleepTime = var1;
  9.    }
  10.  
  11.    public void Start() {
  12.       this.theThread = new Thread(this);
  13.       this.theThread.start();
  14.    }
  15.  
  16.    public void Stop() {
  17.       this.theThread.stop();
  18.    }
  19.  
  20.    public void run() {
  21.       while(true) {
  22.          try {
  23.             ((Component)this).repaint();
  24.             Thread.sleep((long)this.sleepTime);
  25.          } catch (InterruptedException var1) {
  26.          }
  27.       }
  28.    }
  29. }
  30.